# 0! = 1

# formula
# 1! = 1
# 2! = 2
# 3! = 6 = 3 * 2!
# 4! = 24 = 4 * 3!
# ......
#  n! = n * (n - 1)!
def factorial(n):
    if n == 0:
        return 1
    
    return n * factorial(n - 1)

print(factorial(4))